@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <ul class="type-nav">
                    @foreach($types as $type)
                        <li><a href="/venue/type/{{$type->id}}">{{$type->name}}</a> </li>
                    @endforeach
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="col-md-5">
                <img src="/images/ymq.jpg" class="img-responsive">
            </div>
            <div class="col-md-7">
                <h3>{{$venue->name}}</h3>
                <p>{{$venue->address}}</p>
                <p>{{$venue->type->name}}</p>
                <p>{{$venue->des}}</p>
            </div>
        </div>
        <div class="row order-area">
            <div class="col-md-9">
                <div class="order-form">
                     <div class="form-header">
                          @foreach($dates as $k=>$date)
                              <dl @if($k==0) class="active" @endif>
                                  <dt>{{$date["date"]}}</dt>
                                  <dd>{{$date["week"]}}</dd>
                              </dl>
                          @endforeach
                     </div>
                     <div class="form-body">
                          <ul class="times">
                              @foreach($times as $time)
                              <li>{{$time}}</li>
                              @endforeach
                          </ul>

                         @foreach($date_sn_time_prices as $date => $sn_time_prices)
                         <div class="date-wrap">

                             @foreach($sn_time_prices as $sn =>$time_prices)
                             <dl>
                                <dt>场地编号: {{$sn}}</dt>
                                <dd>
                                    <ul>
                                        @foreach($time_prices as $time =>$arr)
                                        <li sn="{{$sn}}" time="{{$time}}" @if($arr["is_ordered"]) class="ordered"  @endif>{{$arr['price']}}</li>
                                        @endforeach
                                    </ul>

                                </dd>
                            </dl>
                             @endforeach
                         </div>

                        @endforeach

                     </div>
                </div>
            </div>



            <div class="col-md-3">
                <hello></hello>
                <input type="hidden" class="venue_id" value="{{$venue->id}}">
                <div id="template">
                    <dl>
                        <dt>11:00</dt>
                        <dd>B2号场地</dd>
                    </dl>
                </div>

                <div class="order-wrap">
                     <div class="order-header">
                         <p>订单类型：{{$venue->type->name}}</p>
                         <p>订单日期：<span class="order-date">{{$dates[0]["date"]}}</span></p>
                     </div>
                     <div class="order-body">

                     </div>
                     <div class="order-footer">
                         <span class="total-price">总价:160元</span>
                         <button class="btn btn-warning save_order">立即下单</button>
                     </div>
                </div>

            </div>
        </div>


        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog sm" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title" id="myModalLabel">提示信息</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

                    </div>
                    <div class="modal-body">
                        亲，最多4个场地哦...
                    </div>

                </div>
            </div>
        </div>

    </div>
@endsection
